package com.controller.test;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
// 这里的2个类可以删掉 ,主要测试两次不同的请求,发现req的hashcode是一样,也就是同一个对象
@WebServlet("/first")
public class FirstServlet extends HttpServlet {
  @Override
  protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
    System.out.println("========");
    System.out.println(req.hashCode());
    System.out.println(req.getClass().getName());
  }
}
